﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/functon.master" AutoEventWireup="true" CodeFile="Delete_RoomCategory.aspx.cs" Inherits="Delete_RoomCategory" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link rel="stylesheet" href="css/admir.css" />
     <link rel="stylesheet" href="css/astyle.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     <div class="admir_l">
        <br />
        <a href="Add_RoomCategory.aspx">增加房间信息</a><br />
        <a href="Search_RoomCatagory.aspx">查看房间信息</a><br />
        <a href="Update_RoomCategory.aspx">更改房间信息</a><br />
        <a href="Delete_RoomCategory.aspx">删除房间信息</a><br />
        <a href="Customers.aspx">查看客户信息</a><br />
        <a href="RoomCustomer.aspx">查看已住客房信息</a><br />
        <a href="RoomStatus.aspx">查看房间状态 </a>
    </div>
    <div class="admir_r">
       
        <table align="center">
            <tr align="right">
                <td >请选择房间类型：
                    <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="RName" DataValueField="RName" Width="120px" Height="30px" BackColor="WhiteSmoke"></asp:DropDownList>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:HotelManagementConnectionString %>" SelectCommand="SELECT [RName] FROM [HM_RoomDropDownList]"></asp:SqlDataSource>
                </td>
                <td align="left">
                    <asp:Button ID="Button1" runat="server" Text="显示" OnClick="Button1_Click"  Width="120px" Height="30px" BackColor="WhiteSmoke"/>
                </td>
            </tr>
            <tr align="center"> 
                <td colspan="2">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                     DataKeyNames="HM_RCategoryId" OnRowDeleting="GridView1_RowDeleting" PageSize="5"
                     OnPageIndexChanging="GridView1_PageIndexChanging" AllowPaging="True"
                     OnRowDataBound="GridView1_RowDataBound" BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3"
                    CellSpacing="1" GridLines="None" Width="757px" >
     
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckItem" runat="server" />
                            </ItemTemplate>
                            <HeaderTemplate>
                                <asp:CheckBox ID="CheckAll" runat="server" AutoPostBack="true" Text="全选" OnCheckedChanged="CheckAll_CheckedChanged" />
                            </HeaderTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="HM_RCategoryId" HeaderText="房间号" />
                        <asp:BoundField DataField="HM_RName" HeaderText="房间类型" />
                        <asp:BoundField DataField="HM_RArea" HeaderText="房间面积" />
                        <asp:BoundField DataField="HM_RBedNum" HeaderText="床位数" />
                        <asp:BoundField DataField="HM_RPrice" HeaderText="房间价格（元/天）" />
                        <asp:TemplateField>
                            <HeaderTemplate>
                                空调
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("HM_RAirCondition").ToString().Equals("0") ? "有" : "无"%>
                            </ItemTemplate> 
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                有线电视
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("HM_RTV").ToString().Equals("0") ? "有" : "无"%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField HeaderText="删除" ShowDeleteButton="True" />
                    </Columns>
                    
                    <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
                    <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
                    <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
                    <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
                    <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#594B9C" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#33276A" />
                    
                </asp:GridView>
                </td> 
            <tr>
                <td style="color:darkorange">每页显示：
                    <asp:DropDownList ID="GridViewPageSize" runat="server" AutoPostBack="true" OnSelectedIndexChanged="GridViewPageSize_SelectedIndexChanged" Width="60px">
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                        <asp:ListItem>12</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label1" runat="server"></asp:Label>
                </td>
            </tr>
            </tr> 
            <tr>
                <td align="right">
                    <asp:Button ID="Check_All" runat="server" Text="删除所选项" OnClick="Check_All_Click" Height="30px" Width="120" BackColor="WhiteSmoke"/>
                </td>   
            </tr>
        </table>
    </div>
    
</asp:Content>

